package com.ecoolex.union.pay.retailer.enums;

import com.ecoolex.framework.common.EnumInterface;
import com.ecoolex.framework.common.util.Check;

public enum UnionPayCouponOperateType implements EnumInterface<UnionPayCouponOperateType, String> {
    COUPON_QUERY("11", "优惠券查询"), COUPON_LOCK("12", "优惠券锁定"), COUPON_UNLOCK("13", "优惠券解锁"), COUPON_VERIFYING("14", "优惠券核销"), TRANSACTION_INQUIRY("15", "交易查询");

    private final String real;

    private final String describe;

    UnionPayCouponOperateType(String real, String describe) {
        this.real = real;
        this.describe = describe;
    }

    @Override
    public String real() {
        return real;
    }

    @Override
    public String describe() {
        return describe;
    }

    public static UnionPayCouponOperateType realValueOf(String real) {
        if (Check.notNull(real)) {
            for (UnionPayCouponOperateType v : values()) {
                if (v.real().equals(real)) {
                    return v;
                }
            }
        }
        return null;
    }
}
